package routers

import (
	"api_server/internal/controllers"
	"api_server/internal/middleware"
	"github.com/gin-gonic/gin"
)

func RegisteCalculate(engine *gin.Engine) {
	openApi := engine.Group("open/calculate")
	calculate := new(controllers.CalculateController)
	openApi.Any("/cmd", calculate.DoCaculateCmd)

	authApi := engine.Group("auth/calculate").Use(middleware.VerifyToken())

	//重新计算
	authApi.POST("/afresh", calculate.DoAfresh)
	//当前排队
	authApi.GET("/lineup", calculate.GetLineup)
	//中断计算操作
	authApi.POST("/abort", calculate.Abort)

}
